/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package WekaModels;

import grex.Data.ArffTableModel;
import weka.classifiers.Classifier;
import weka.classifiers.meta.Bagging;
import weka.classifiers.trees.J48;
import weka.classifiers.trees.M5P;
import weka.core.Instance;
import weka.core.Instances;

/**
 *
 * @author RIK
 */
public class GrexM5PBag extends WekaPredictiveModel {
    public Bagging bag;
    private Classifier[] baseModels;
    public GrexM5PBag(ArffTableModel data){
        super(data, new Bagging());
        bag = (Bagging) model;
        baseModels = new Classifier[20];
        for(int i=0;i<baseModels.length;i++){
            M5P m5 = new M5P();
            m5.setBuildRegressionTree(false);
            m5.setUseUnsmoothed(false);
            baseModels[i]=m5;
        }
    }
    
    public double getNrOfNodes() {
        return baseModels.length;
    }

    public String getName() {
        return "M5PBag";
    }
    
}
